//
//  TCP4Socket.h
//  SimpleServer
//
//  Created by Sean Breid on 12/16/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>



struct SocketImpl;

@interface TCP4Socket : NSObject{
    
        struct SocketImpl* Sockets;
    
    
}

-(id)initWithPort:(NSInteger) port;

-(id)initWithSocket: (struct SocketImpl*) sockStruct; 

-(void)Listen;

-(TCP4Socket*)Accept;

-(void)SendWithBuffer: (NSData*) buffer ofSize: (NSInteger) length;

-(id)ReceiveBufferOfSize:(NSInteger) length;

-(void)ConnectToAddress: (NSString*) address onPort: (NSInteger) port;

-(void)Close;


@end
